package com.ybbase.framework.model.po.flow;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.time.LocalDate;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.util.Date;

/**
 * <p>
 * 流程节点记录
 * </p>
 *
 * @author cg
 * @since 2019-12-04
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("act_node_record")
@ApiModel(value="NodeRecord对象", description="流程节点记录")
public class NodeRecord extends Model<NodeRecord> {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "唯一编码 : 唯一编码")
    private Integer id;

    @ApiModelProperty(value = "流程实例记录表id : 流程实例记录表id")
    private Integer instanceRecordId;

    @ApiModelProperty(value = "流程模型id : 流程模型id")
    private String modelId;

    @ApiModelProperty(value = "流程运行实例id : 流程运行实例id")
    private String runProcessInstanceId;

    @ApiModelProperty(value = "流程运行定义实例id : 流程运行定义实例id")
    private String runDefinitionId;

    @ApiModelProperty(value = "关联流程节点id : 关联流程节点id")
    private String nodeId;

    @ApiModelProperty(value = "节点名称 : 节点名称")
    private String nodeName;

    @ApiModelProperty(value = "流程审核条件 : 流程审核条件")
    private String examineCondition;

    @ApiModelProperty(value = "流程节点审批内容 : 流程节点审批内容")
    private String assigneeContent;

    @ApiModelProperty(value = "流程节点开始时间 : 流程节点开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date startTime;

    @ApiModelProperty(value = "流程节点结束时间 : 流程节点结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date endTime;

    @ApiModelProperty(value = "间隔时长 : 间隔时长")
    private Long limitTime;

    @ApiModelProperty(value = "历史流程实例id : 历史流程实例id")
    private String hisProcessInstanceId;

    @ApiModelProperty(value = "流程应用id（扩展） : 流程应用id（扩展）")
    private String applicationId;

    @ApiModelProperty(value = "流程节点审批人id : 流程节点审批人id")
    private Integer assigneeId;

    @ApiModelProperty(value = "流程节点审批人名称 : 流程节点审批人名称")
    private String assigneeName;

    @ApiModelProperty(value = "流程节点审批部门 : 流程节点审批部门")
    private Integer organId;

    @ApiModelProperty(value = "流程节点审批部门名称 : 流程节点审批部门名称")
    private String organName;

    @ApiModelProperty(value = "流程节点审批结果 : 流程节点审批结果")
    private String approvalResult;

    @ApiModelProperty(value = "流程下个节点id : 流程下个节点id")
    private String nextNodeId;

    @ApiModelProperty(value = "任务编码 : 任务编码")
    private String taskId;

    @ApiModelProperty(value = "业务编码 : 业务编码")
    private String businessId;

    @ApiModelProperty(value = "业务名称 : 业务名称")
    private String businessName;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @ApiModelProperty(value = "下个节点的审核人")
    @TableField(exist = false)
    private String nextNodeApproveNames;

}
